<template>
  <el-row type="flex" justify="end" class="bottom">
    <el-pagination
      background
      layout="prev, pager, next,sizes,jumper"
      :total="tableData.counts"
      :page-sizes="[5, 10, 20, 50]"
      :page-size.sync="pagesize"
      :current-page.sync="page"
      @current-change="change"
      @size-change="change"
    >
    </el-pagination>
  </el-row>
</template>

<script>
export default {
  props: ['tableData'],
  data () {
    return {
      page: 1,
      pagesize: 5
    }
  },
  methods: {
    change () {
      this.$emit('changePage', { page: this.page, pagesize: this.pagesize })
    }
  }
}
</script>

<style scoped>
.bottom {
  margin-top: 20px;
}
</style>
